-- GENERATED SPELL FOR [Mana Shifter] --


function spell0_16310(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(29106,pUnit)
pUnit:RegisterEvent('Sorts_16310', 625, 1)
end

function spell1_16310(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(29058,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_16310', 5000, 1)
end

function Sorts_16310(pUnit, Event)
local choix_sorts_16310 = math.random(0, 1)
if choix_sorts_16310 == 0 then
pUnit:RegisterEvent('spell0_16310', 1, 1)
end
if choix_sorts_16310 == 1 then
pUnit:RegisterEvent('spell1_16310', 1, 1)
end
end

function mob16310_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16310', math.random(1500, 3000), 1)
end

function mob16310_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16310_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16310_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16310, 1, 'mob16310_Action')
RegisterUnitEvent(16310, 2, 'mob16310_Leave')
RegisterUnitEvent(16310, 3, 'mob16310_Kill')
RegisterUnitEvent(16310, 4, 'mob16310_Die')
